package com.armani.service;

import com.armani.entity.Address;

import java.util.List;

/**
 * @ProjectName: armani
 * @Package: com.armani.service
 * @ClassName: AddressService
 * @Description: TODO
 * @Author: Roc
 * @Date: 2021/11/28 20:47
 * @Version: 1.0
 **/
public interface AddressService {
    /**
     *
     * @param shopUser
     * @param userId
     * @param phone
     * @param province
     * @param city
     * @param district
     * @param detail
     * @param startRow
     * @param limit
     * @return
     */
    List<Address> ListSearch(String shopUser,Integer userId,
                             String phone,String province,
                             String city,String district,
                             String detail,Integer startRow,
                             Integer limit);

    /**
     * 获取总条数
     * @param shopUser
     * @param userId
     * @param phone
     * @param province
     * @param city
     * @param district
     * @param detail
     * @return
     */
    Integer getCount(String shopUser,Integer userId,
                     String phone,String province,
                     String city,String district,
                     String detail);

    /**
     * 添加
     * @param shopUser
     * @param userId
     * @param phone
     * @param province
     * @param city
     * @param district
     * @param detail
     * @return
     */
    Integer insert(String shopUser,Integer userId,
                   String phone,String province,
                   String city,String district,
                   String detail);

    /**
     * 修改
     * @param shopUser
     * @param userId
     * @param phone
     * @param province
     * @param city
     * @param district
     * @param detail
     * @param id
     * @return
     */
    Integer update(String shopUser,Integer userId,
                   String phone,String province,
                   String city,String district,
                   String detail,Integer id);

    /**
     * 删除
     * @param id
     * @return
     */
    Integer delete(Integer id);

    /**
     * 查询用户地址
     * @param user 用户id
     * @return 用户地址列表
     */
    List<Address> searchByUserId(Integer user);
}
